﻿using System;
using System.Data;

namespace msBsc.WebUi
{
    public partial class wfElectronicMall : msBsc.Cls.BPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindControls(); 
                //ShowData(this.Request.QueryString.Get("ID"));
                //this.ExecJScript("$('#txtId').val('" + msBsc.AppLogic.Cfg.HttpTools.stringToJson(this.Request.QueryString.Get("ID")) + "');");
                loadGoodslist("");
            }
        }

        private void BindControls()
        {
            if (!IsPostBack)
            {
            }
        }
         

        private void loadGoodslist(string _strSpeType)
        {
            using (msBsc.AppLogic.DataAlc.CBizShpGoodsInfo odataobj = new AppLogic.DataAlc.CBizShpGoodsInfo())
            {
                DataSet ds = odataobj.SelectGoodsListForSpecialSellingVew(_strSpeType);

                string strjsontem1 = msBsc.AppLogic.Cfg.HttpTools.GetJsonByTable(ds.Tables[0], "", "DATA_TYPE,SHOP_ID,DATA_TYPE_DESC,DATA_SEQ_NUM,CHILD_LINKS", 1, 1000, "");
//                this.ExecJScript(@"debugger;
//                "); 
                string strTemp = "";
                if (_strSpeType == "0" || _strSpeType == "1" || _strSpeType == "2")
                {
                    strTemp = "/Template/SysSpecialSellingGoodsList0.html";
                }
                this.ExecJScript(@" var data= " + strjsontem1 + @" ; 
                doBoundGoodsList( data,'" + strTemp + "');"); 
            }
        }
         
    }
}